package com.mrinalwadhwa.effects.colorquantization
{
	import com.mrinalwadhwa.effects.BendPixels;
	import flash.utils.ByteArray;
	import mx.effects.IEffectInstance;
	
	public class ColorQuantizationEffect extends BendPixels{

		[Embed("dynamic_palette.pbj", mimeType="application/octet-stream")]
		private var ColorQuantizationFilter:Class;

		public static const MIN_PALETTE:Number = 1; 
		public static const MAX_PALETTE:Number = 128; 
		public static const DEFAULT_PALETTE:Number = 64; 

		[Inspectable(category="General")]		
		public var fromPalette:Number;
		
		[Inspectable(category="General")]
		public var toPalette:Number;

		public function ColorQuantizationEffect(target:Object=null){
			super(target);
		}
		
        override protected function initInstance(inst:IEffectInstance):void {
			benderByteArray = new ColorQuantizationFilter() as ByteArray
			benderParams = [['palette',fromPalette,toPalette]];	
            super.initInstance(inst);
        } 		

	}
}